package com.example.jikeyoujikeyou.office_sz.model.base;

import java.util.Date;

/*
 * DROP TABLE IF EXISTS `attendance_setting`;
   CREATE TABLE `attendance_setting` (
  `id` char(18) NOT NULL,
  `sign_in_time` datetime DEFAULT NULL,
  `sign_out_time` datetime DEFAULT NULL,
  `work_day` int(11) DEFAULT NULL COMMENT '''工作日,以0,1,2,3,4,5,6分别表示周日、周一至周六。'',',
  `longitude` double DEFAULT NULL COMMENT '经度',
  `latitude` double DEFAULT NULL COMMENT '纬度',
  `address` varchar(255) DEFAULT NULL,
  `company_id` char(18) DEFAULT NULL,
  `effective_range` int(11) DEFAULT NULL COMMENT '打卡有效半径:1-300, 2-500, 3-800, 4-1000(米)',
  `create_time` timestamp DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 */

public class BaseAttendanceSetting extends BaseModel {

    public static final Integer SUNDAY = 0;
    public static final Integer MONDAY = 1;
    public static final Integer TUESDAY = 2;
    public static final Integer WEDNESDAY = 3;
    public static final Integer THURSDAY = 4;
    public static final Integer FRIDAY = 5;
    public static final Integer SATURDAY = 6;

    public static final Integer MIN_EFFECTIVE_RANGE = 1;
    public static final Integer MAX_EFFECTIVE_RANGE = 1000;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.id
     *
     * @mbggenerated
     */
    private String id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.sign_in_time
     *
     * @mbggenerated
     */
    private String signInTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.sign_out_time
     *
     * @mbggenerated
     */
    private String signOutTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.work_day
     *
     * @mbggenerated
     */
    private Integer workDay;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.longitude
     *
     * @mbggenerated
     */
    private String longitude;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.latitude
     *
     * @mbggenerated
     */
    private String latitude;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.address
     *
     * @mbggenerated
     */
    private String address;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.company_id
     *
     * @mbggenerated
     */
    private String companyId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.effective_range
     *
     * @mbggenerated
     */
    private Integer effectiveRange;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column attendance_setting.create_time
     *
     * @mbggenerated
     */
    private String createTime;

    /**
     * 构造方法.
     *
     * @param json
     */
    public BaseAttendanceSetting(String json) {
        super(json);
    }

    public String getId() {
        if (null == id) {
            return (String) get("id");
        }
        return id;
    }

    public void setId(String id) {
        this.put("id", id);
        this.id = id;
    }

    public String getSignInTime() {
        if (null == signInTime) {
            return (String) get("signInTime");
        }
        return signInTime;
    }

    public void setSignInTime(String signInTime) {
        this.put("signInTime", signInTime);
        this.signInTime = signInTime;
    }

    public String getSignOutTime() {
        if (null == signOutTime) {
            return (String) get("signOutTime");
        }
        return signOutTime;
    }

    public void setSignOutTime(String signOutTime) {
        this.put("signOutTime", signOutTime);
        this.signOutTime = signOutTime;
    }

    public Integer getWorkDay() {
        if (null == workDay) {
            return (Integer) get("workDay");
        }
        return workDay;
    }

    public void setWorkDay(Integer workDay) {
        this.put("workDay", workDay);
        this.workDay = workDay;
    }

    public String getLongitude() {
        if (null == longitude) {
            return (String) get("longitude");
        }
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.put("longitude", longitude);
        this.longitude = longitude;
    }

    public String getLatitude() {
        if (null == latitude) {
            return (String) get("latitude");
        }
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.put("latitude", latitude);
        this.latitude = latitude;
    }

    public String getAddress() {
        if (null == address) {
            return (String) get("address");
        }
        return address;
    }

    public void setAddress(String address) {
        this.put("address", address);
        this.address = address;
    }

    public String getCompanyId() {
        if (null == companyId) {
            return (String) get("companyId");
        }
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.put("companyId", companyId);
        this.companyId = companyId;
    }

    public Integer getEffectiveRange() {
        if (null == effectiveRange) {
            return (Integer) get("effectiveRange");
        }
        return effectiveRange;
    }

    public void setEffectiveRange(Integer effectiveRange) {
        this.put("effectiveRange", effectiveRange);
        this.effectiveRange = effectiveRange;
    }

    public String getCreateTime() {
        if (null == createTime) {
            return (String) get("createTime");
        }
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.put("createTime", createTime);
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "BaseAttendanceSetting{" +
                "id='" + id + '\'' +
                ", signInTime=" + signInTime +
                ", signOutTime=" + signOutTime +
                ", workDay=" + workDay +
                ", longitude=" + longitude +
                ", latitude=" + latitude +
                ", address='" + address + '\'' +
                ", companyId='" + companyId + '\'' +
                ", effectiveRange=" + effectiveRange +
                ", createTime=" + createTime +
                '}';
    }
}